{php}
$row['values']=isset($row['values'])?json_decode($row['values'],true):[];
{/php}
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead"><em>同步前台用户配置</em></div>
        {:build_heading(null,FALSE)}
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                        <input id="c-key" type="hidden" data-rule="required"  class="form-control" name="row[key]" value="{$key}" readonly/>
                        <div class="row">
                            <div class=" form-group hide">
                                <label for="c-describe" class="control-label col-xs-12 col-sm-2">{:__('说明')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-describe" data-rule="required" type="text" class="form-control" name="row[describe]" value="同步前台用户配置" readonly />
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="c-purpose" class="control-label col-xs-12 col-sm-2">{:__('同步目的')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:build_radios('row[values][purpose]', ['1'=>__('客户'), '2'=>__('线索')], isset($row['values']['purpose'])?$row['values']['purpose']:1)}
                                    <span class="text-gray">可以选择同步到客户表还是线索表。</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('选择来源')}:</label>
                                <div class="col-xs-12 col-sm-8">

                                    {:build_select('row[values][source]', $sourceList, isset($row['values']['source'])?$row['values']['source']:'', ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
                                    <span class="text-gray">通过该应用添加的客户来源</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('分配团队')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:build_select('row[values][group_id]', $groupdata, isset($row['values']['group_id'])?$row['values']['group_id']:'', ['class'=>'form-control selectpicker', 'id'=>'c-group_id'])}
                                    <span class="help-block">*如果归属员工字段为空，自动分配,都不选进入公海。</span>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="c-owner_user_id" class="control-label col-xs-12 col-sm-2">{:__('分配员工')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-owner_user_id"  data-source="facrm/common/selectpage/model/admin" data-multiple="true" data-field="nickname" class="form-control selectpage"
                                           name="row[values][owner_user_id]" type="text" value="{:isset($row['values']['owner_user_id'])?$row['values']['owner_user_id']:''}" placeholder="选择">
                                    <span class="help-block">*如果选择了指定员工，归属团队不生效,都不选进入公海。</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('提醒跟进')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:build_select('row[values][needfollow]', [1=>'需要','0'=>'不需要'], isset($row['values']['needfollow'])?$row['values']['needfollow']:0, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
                                    <span class="text-gray"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:build_select('row[values][status]', [1=>'正常','0'=>'禁用'], isset($row['values']['status'])?$row['values']['status']:'', ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
                                    <span class="text-gray"></span>
                                </div>
                            </div>

                            <div class="form-group layer-footer">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-8">
                                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('submit')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </div>
                            </div>
                    </form>



                </div>
            </div>

        </div>
    </div>
</div>





